<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache"/>   
<meta http-equiv="Cache-Control" content="no-cache, must-revadivdate"/>   
<meta http-equiv="expires" content="0"/> 
<title>打印认证接口</title>
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.base64.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<style type="text/css"> 
.align-center{ 
	margin:0 auto; /* 居中 这个是必须的，，其它的属性非必须 */ 
	width:800px; /* 给个宽度 顶到浏览器的两边就看不出居中效果了 */ 
	background:white; /* 背景色 */ 
	text-align:center; /* 文字等内容居中 */
	margin-top:20px; 
	border:1px solid gray;
} 
</style> 
<script language="javascript" type="text/javascript">

	
	function submit(){
		document.authorize.submit();
	}
	
	function submit2(){
		document.notification.submit();
	}
	
	function callback(){
		var result = document.getElementById("authorizeFrame").contentWindow.document.body.innerHTML;
		$("#resultEncode").val(result);
		result = $.base64().decode(result);
		try{
			var status = result.substr(0,2);
			var xml = result.substr(3,result.length-3);
			$("#resultDecode").val(status+'\r\n'+xml);	
		}catch(e){
			console.log(e.message);
			$("#resultDecode").val(result);	
		}
		$("#resultDecode").val(result);		
	}
	
	
	
</script>
</head>

<body>	
	<div  class="align-center" >
		<form name="authorize" action="/euc/externalLogin" method="post" target="authorizeFrame">
			<div class="row" style="margin:20px 0px 20px 0px;">
				<div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >接口地址</label>
			    	<input class="col-md-9 column" value='/euc/externalLogin' />
			    </div>
			    
			    
			    <div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >登录名</label>
			    	<input class="col-md-9 column" name="loginAccount" value='13522931134' />
			    </div>
			    
			    <div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >登录密码</label>
			    	<input class="col-md-9 column" name="loginPassword" value='123456' />
			    </div>
			    
			    <div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >登录域</label>
			    	<input class="col-md-9 column" name="loginDomain" value='' />
			    </div>
			    
			    <div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >卡号</label>
			    	<input class="col-md-9 column" name="loginCard" value='12345' />
			    </div>
			    
			    <div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >设备序列号</label>
			    	<input class="col-md-9 column" name="serialNumber" value='' />
			    </div>
				    
				<div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
			    <div class="col-md-12 column">
			    	<input name="btnSave"  id="btnTest"  type="button" class="btn" onclick="submit();" value="提交"/>
			    </div>
		    </div>
	    </form>
	    <form name="notification" action="/euc/mfpLogNotification" method="post" target="authorizeFrame">
			<div class="row" style="margin:20px 0px 20px 0px;">
				<div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
				<div class="col-md-12 column">
			    	<label class="col-md-2 column" >接口地址</label>
			    	<input class="col-md-9 column" value='/euc/mfpLogNotification' />
			    </div>
				
				<div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
			    <div class="col-md-12 column">
			    	<label class="col-md-2 column" ></label>
			    	<textarea class="col-md-9 column" cols="" rows="8" class="langtext" name='jobData' >{"color_surface":1,"duplex":1,"job_id":"20170527-8894-b60b345c-7563-4cec-b7e9-e416275e8d13","job_name":"Test Page","job_type":"PRINT","location":"T2-13F","mono_surface":0,"paper_size":"A4","print_time":"2017-05-27 12:29:33","serial_number":"TC100889881174","user_id":"123456789","user_name":"jerry"}</textarea>
			    </div>

				<div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
			    <div class="col-md-12 column">
			    	<input name="btnSave"  id="btnTest"  type="button" class="btn" onclick="submit();" value="提交"/>
			    </div>
		    </div>
	    </form>
	    <div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
	    <div class="col-md-12 column">
	    	<label class="col-md-2 column" ></label>
	    	<textarea class="col-md-9 column" name="resultEncode" id="resultEncode" cols="" rows="6" class="langtext"></textarea>
	    </div>
	    

		<div style="width:100%;height:25px;border:0px solid red;">&nbsp;</div>
	    <div class="col-md-12 column">
	    	<label class="col-md-2 column" ></label>
	    	<textarea class="col-md-9 column" name="resultDecode" id="resultDecode" cols="" rows="8" class="langtext"></textarea>
	    </div>
	    <iframe name="authorizeFrame" id="authorizeFrame" style="display:none;" onload="callback();" src="about:blank">
	    
	    </iframe>
	</div>
	

</body>
</html>
